/*
#include <iostream>
using namespace std;
main()
{
	char a[20],b[20],c[20];
	char *str1,*str2,*str3,*temp;
	cout<<"Input 3 words:"<<endl;
    cout<<"Input a[20]"<<endl;   
	cin>>a; //cin>>a[20] is wrong,for a[20] is the element               
	cout<<"Input b[20]"<<endl;
	cin>>b;
	cout<<"Input c[20]"<<endl;
	cin>>c;
	str1=a;
	str2=b;
	str3=c;	
	if(strcmp(str1,str2)>0)
	{
		temp=str1;
		str1=str2;
		str2=temp;
	}
	if(strcmp(str1,str3)>0)
	{
		temp=str1;
		str1=str3;
		str3=temp;
	}
	if(strcmp(str2,str3)>0)
	{
		temp=str2;
		str2=str3;
		str3=temp;
	}
	cout<<"The sorted words are:"<<endl;
    cout<<str1<<endl;
	cout<<str2<<endl;
	cout<<str3<<endl;
	return 0;
}
*/

/*
#include <iostream>
using namespace std;
main()
{
	void sort(char **k1,char **k2,char **k3);
	char a[20],b[20],c[20];
	char *str1,*str2,*str3;
	char **str_p1,**str_p2,**str_p3;
	cout<<"Input 3 words:"<<endl;
    cout<<"Input a[20]"<<endl;   
	cin>>a;               
	cout<<"Input b[20]"<<endl;
	cin>>b;
	cout<<"Input c[20]"<<endl;
	cin>>c;
	str1=a;
	str2=b;
	str3=c;	
	str_p1=&str1;
	str_p2=&str2;
	str_p3=&str3;	
	sort(str_p1,str_p2,str_p3);
	cout<<"The sorted words are:"<<endl;
    cout<<str1<<endl;
	cout<<str2<<endl;
	cout<<str3<<endl;
	return 0;
}

void sort(char **k1,char **k2,char **k3)
{
	void change(char **m1,char **m2);
	change(k1,k2);
	change(k1,k3);
	change(k2,k3);
}
void change(char **m1,char **m2)
{
	char *temp;
	if(strcmp(*m1,*m2)>0)
	{
		temp=*m1;
		*m1=*m2;
		*m2=temp;
	}
}
*/


		



	
